function animation(obj, target, callback) {
  clearInterval(obj.timer);
  obj.timer = setInterval(function () {
    // 缓动动画的实现
    var step = (target - obj.offsetLeft) / 10;
    step = step > 0 ? Math.ceil(step) : Math.floor(step);
    // 这里需要等于才可以判断
    if (obj.offsetLeft == target) {
      clearInterval(obj.timer);
      // console.log(callback);
      callback();
    }
    obj.style.left = obj.offsetLeft + step + "px";
    // console.log(obj.offsetLeft + step + "px");
  }, 50);
}